import request from "@/utils/request";
import { url } from "inspector";

const CareOrder_BASE_URL = "/api/v1/CareOrder";

class CareOrderAPI {
  /**
  * 获取用户分页列表
  *
  * @param queryParamsOrder 查询参数
  */
  static getPage(queryParams: CareOrderQuery) {
    return request<any, PageResult<CareOrderPageVO[]>>({
      url: `${CareOrder_BASE_URL}/page`,
      method: "get",
      params: queryParams,
    });
  }
  static getPage1(queryParams: CareOrderQuery) {
    return request<any, PageResult<CareOrderPageVO[]>>({
      url: `${CareOrder_BASE_URL}/page1`,
      method: "get",
      params: queryParams,
    });
  }

  static xianjina(data: any) {
    return request<any, any>(
      {
        url: `${CareOrder_BASE_URL}/xianjianzhifu`,
        method: "post",
        data,
      }
    );
  }
  static xianjintuifei(data: any) {
    return request<any, any>(
      {
        url: `${CareOrder_BASE_URL}/xiantuifei`,
        method: "post",
        data,
      }
    );
  }
}

export default CareOrderAPI;

export interface CareOrderQuery extends PageQuery {
  chId: string;
  itemType: number;
}

export interface CareOrderPageVO {
  orderId: string;
  itemId?: string,
  coId?: string,
  itemRefId?: string,
  itemName?: string,
  itemType?: string,
  num?: string,
  price?: string,
  amount?: string,
  remark?: string,
  status?: string,
  createTime?: string
}

